class Feed::InstallItemCreated < Feed
  
  validates :order_id,
    :order_item_id,
    :installation_id,
    :install_item_id,
    :furniture_logistic_stat_order_item_id,
    :presence => true  
    
  def code
    ActiveSupport::StringInquirer.new('has_been_sent_to_installer')
  end
  
  def short_desc
    "#{installation.creator.full_name}<b>安排</b>#{installation.installer.present? ? installation.installer.full_name : '?'}#{installation.installed_on}<b>上门安装</b>【#{furniture_logistic_stat_order_item.furniture_logistic_stat.dept.name} => #{install_item.has_been_sent_to_installer_count}件】"
  end
  
  def remark
    installation.remark
  end
end